The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
There's no list of connected players of all time.
If you would want that, you will need to start storing them and check if they are already stored, when someone connects.
Bas-Driver recently started some topics about functions and another good source of information is the changes.txt found in the 'doc' folder.
Yisc[NL]
S3 licensed
There is code to get the currently connected players:


$mList = GetListOfPlayers("N"); //Get list currently connected players
$mCount = arrayCount( $mList ); //Count the number of players in array
$plyNum=0; //Set playernumber to zero

### Walk through array of connected players and get their username ###
WHILE ($plyNum < $mCount)
$uName = $mList[$plyNum];
$plyNum=$plyNum+1;
ENDWHILE
### End ###

Within the While-loop you can gather information for all players with code like: GetPlayerVar($uName,"NickName")

There is no function for sorting, so you will have make that yourself.

I don't understand what you mean with "count_values_in_storedvalue".
You can retrieve a storedvalue and if that happens to be a number, you can use it in a FOR-loop.
But you can't count all storedvalues in the database.
Yisc[NL]
S3 licensed
What's the bug (I don't get it, but that could just be me)?
Isn't that text coming from LFS instead of Lapper?
Yisc[NL]
S3 licensed
Quote from Bass-Driver :I talked to him, and his explaination: he want to display the online/offline status the serveradmin in his server.
Exacly what i thought.

But indeed, his first post could have more details.

Like this notifying system you mean? Wink
Link: https://www.lfs.net/forum/post/1909625#post1909625
Yisc[NL]
S3 licensed
The first screenshot shows a GUI for when a player is connected to the server, when he isn't, he will not see the GUI so why would you want an offline status?
Unless someone is connected and would be able to set his/her status to Offline (while not really being offline).
Yisc[NL]
S3 licensed
There is no way to write things into DriftPB.dbs or gripDB.dbs
Everything you want to store/retrieve has to go into storedvalue.dbs
Yisc[NL]
S3 licensed
With the code you supplied, nothing is saved, so that's what's wrong Smile
In the first line you gave, you are setting the value 'recomended' by retrieving it from the database.
In the second piece of code, you are retrieving it again from the database and display the value as a global message.
When you want to write value 'recomended' to the database, the code should be like this:

$userName = GetCurrentPlayerVar( "UserName" );
SetStoredValue( $userName . "recomended", GetCurrentPlayerVar( "recomended" ) );

In case you are willing to learn something about the English language, recommended has to be written with double M Smile
Yisc[NL]
S3 licensed
Here's a quick example.
Don't expect a quick answer after this message, as I'm off to bed now.


This can go in the OnConnect or OnConnectClose event:

### Get UserName and search in storedvalue.dbs for saved values for this user ###
$userName = GetCurrentPlayerVar( "UserName" );

SetCurrentPlayerVar( "total",GetStoredValue( $userName . "total" ) );
### End ###

If the value would be empty (because someone is new on your server, you can check if it is and give it a default value:

### Set default values if no values are loaded ###
IF ( GetCurrentPlayerVar( "config_pb_display_gui" ) == "")
THEN
SetCurrentPlayerVar( "total",0 ); # Set default value to 0
ENDIF
### End ###

This should go in a seperate event to save the value or values back to the database:

$userName = GetCurrentPlayerVar( "UserName" );
SetStoredValue( $userName . "total", GetCurrentPlayerVar( "total" ) );

Have a look in my pitboard or reg_system script to see how I do this.
Yisc[NL]
S3 licensed
Have you declared $testvar as a GlobalVar in the OnLapperStart event?
Like this:


### Declare global variables ###
GlobalVar $testvar;
### End ###

### Give global variables an empty value ###
$testvar=0;
### End ###

This way you can use the variable anywhere in your script.

*edit*

There an error in your GlobalMsg syntax as well.
That should be:


GlobalMsg ("Debug: ".$testvar);

Yisc[NL]
S3 licensed
Can you show (some) of your code please?
I'm sure I will be able to help you.
Yisc[NL]
S3 licensed
$testvar=0; //just for this example to give it any value

$testvar=$testvar+1;

Yisc[NL]
S3 licensed
Registration system - V1.11b (to add an extra layer of protection against unwanted people on your server)

Changelog:

- Forgot to remove one piece of the ban management code

Ban management system - V1.01 (module to manage server bans, without having the use the LFS banfile)

Changelog:

- Forgot to add a ban check when connecting to server

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Registration system - V1.11 (to add an extra layer of protection against unwanted people on your server)

Changelog:

- Removed all code for ban management and put it in a seperate module

Ban management system - V1.00 (module to manage server bans, without having the use the LFS banfile)

Changelog:

- Initial release

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Handicap system - V1.13 (tool to set handicaps for 5 different classes (or subclasses) and 4 different cars)

Changelog:

-Added checks for every P_Tres to see if variable is number
-Added checks for every P_Mass to see if variable is number

Change the extension of the file to .lpr and add them to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Quote from A z :yes i use crack server & i don't steel any thing please if you can help tell me if you can't don't see any thing again.

This is enough reason to close this topic.
Yisc[NL]
S3 licensed
@A z: we have been sending alot of messages between us and while I gave you a lot of instructions about what to do and probably solve your issue, you fail to respond to this. See the instructions I gave you and answer the questions I gave you. Thread closed.
Yisc[NL]
S3 licensed
Registration system - V1.10 (to add an extra layer of protection against unwanted people on your server)

Changelog:

- Added option to check if someone is banned and if so, kick him out
- Added option to ban someone and write that ban to a file

Change the extension of the file to .lpr and add them to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
PrivMsg is only a private message to a player and the %{main_whitegrades}% has to do with the language selection.

Although Lapper hasn't really got a function to load text from a text-file, you could abuse UserGroupFromFile for this purpose.
Have a look at this script written by Bass-Driver: https://www.lfs.net/forum/post/1906198#post1906198
Yisc[NL]
S3 licensed
$Y = X-Axis position of object

I think that should be Y-axis position of object Wink
Yisc[NL]
S3 licensed
Sounds like Airio gets stuck somehow and can come out of that state when you change the track, but often stays stuck. Only the log-file would help you to figure out what is happening. If you can't get it to work, go and get Lapper and use the handicap system I wrote for it Wink
Yisc[NL]
S3 licensed
Quote from Djem95 :I have other user, but with my other user I can't comment in forum Smile

I don't want to start a flamewar here, but this is said so many times by people.
What's the reason you can't comment using your licensed account?
Has it been banned or is there a technical problem?
In case of the last reason, it might be a good thing to contact Victor and make sure this is sorted rather sooner then later.
I always feel that people say they have another count, while in fact they haven't got one or haven't got it by actualy paying for the game.
Yisc[NL]
S3 licensed
It's possible to display the realtime speed (and much more) of any player who is connected to your server.
Create an event to display a button like this:

openButton( GetCurrentPlayerVar("UserName"), "follow_speed_2",11,124,22,5,5,2,80,"^7" . GetPlayerVar( $uName, "InstantSpeed") . " " . GetPlayerVar( $uName, "UnitSpeed"),test_follow );

$uName should be replaced with the username you want to view the speed from
test_follow , means that after 2 seconds (which is the 7th value in the button code) the button will redirect the code to that event.
Now you will see the speed of that player which is updated every 2 seconds.

I made some testcode for that back in the days, which looks like this:

You get a list of every player connected to the server and press 'Follow player' button behind the name of the person you want to follow.


The text of the button becomes green, to indicatie who you are following (if you press that again, you will stop following that person).


Once you close the main screen, a small window is brought up, that shows you the current speed, current sector, current node and the gap before and behind the selected player. All that information is updated every 2 seconds.




I'm not going the share the whole code, as it is relatively easy to make once you know the basics of Lapper.
If you don't know the basics of Lapper yet, this will be a good exercise to learn them.
There's enough explanations and examples on this forum to get you going.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Ctrack - V1.10 (tool to change the loaded track of an LFS server)

Changelog:

- Updated BL tracks

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use them.

To be able to use Ctrack properly, you also need an updated version of trackList.cfg which is also included in this message.
Change the extension to .cfg and put it in the bin-folder of Lapper.
Restart Lapper to activate the new file(s).
Yisc[NL]
S3 licensed
No, the number behind the / is indicating in which class you will be racing. Any new driver in the AB.nl leagues will start in class 4. Based on your results, you can get 'promoted' to another league. Those 'promotions' are announced by the AB.nl admins before the start of a new season.
Yisc[NL]
S3 licensed
Quote from BSBR18 :!Admins, is it possible to make a lpr file that looks like admins or is it in the forum

The script you ask for, is indeed on the forum.
See link below.

https://www.lfs.net/forum/post/1909624#post1909624
FGED GREDG RDFGDR GSFDG